<?php
/*
 * IKPHP 爱客开源社区 @copyright (c) 2012-3000 IKPHP All Rights Reserved 
 * @Author 小麦
 * @Email:ikphp@sina.cn
 * @Description:网站基础控制器类
 */
class controller_base extends controller{
	protected function _init(){
	    //初始化网站配置
        if (false === $setting = S('setting')) {
            $setting = D('common/setting')->setting_cache(); 
        }
        C($setting);
        $this->_initVar();
	}
	/*
	 * 网站常量初始化
	 * */
	private function _initVar(){
        //当前app名称
        $this->assign('app_name',strtolower(MODULE_NAME));
        //当前controll名称
        $this->assign('controll_name',strtolower(CONTROLLER_NAME)); 
        //当前action名称
        $this->assign('action_name',strtolower(ACTION_NAME)); 		
	}
}